thirdparty_root := ./../StaticLib
CC := g++

INCS += -I${thirdparty_root}
LEXE:=a.out

LIBS +=	${thirdparty_root}/libADD.a

AFLAGS := -Wall -c -fPIC -O2 -std=c++11 $(INCS)
LDFLAGS := -lpthread 
LDFLAGS += -Wl,-rpath,${thirdparty_root}

OBJS := $(patsubst %.cpp,%.o,$(shell find . -name "*.cpp"))


$(LEXE): $(OBJS)
	$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)

$(OBJS): %.o:%.cpp
	$(CC) $(AFLAGS) $^ -o $@

debugOBJS:
	@echo ${OBJS}

.PHONY: clean FaceFilter setenv

clean:					
	rm -rf *.o *.so *.a *.out 
